package ae.pcfc.etks.online.ced.web.domain.manager;


import java.util.Collection;

import ae.pcfc.etks.online.common.exception.LookupException;
import ae.pcfc.etks.online.common.exception.PersistenceException;

public interface BaseDomainObjectManager<T> {
	/**
	 * add
	 * Method to add an entity object
	 * @param domainObject
	 * @throws PersistenceException
	 * void
	 */
	public void add(T domainObject) throws PersistenceException;

	/**
	 * update
	 * Method to update the entity object
	 * @param domainObject
	 * @throws PersistenceException
	 * void
	 */
	public void update(T domainObject) throws PersistenceException;

	/**
	 * delete
	 * Method to delete the entity object
	 * @param domainObject
	 * @throws PersistenceException
	 * void
	 */
	public void delete(T domainObject) throws PersistenceException;

	/**
	 * findByPrimaryKey
	 * Method to find the domain object by primary key
	 * @param domainObject
	 * @return
	 * @throws LookupException
	 * T
	 */
	public T findByPrimaryKey(String id) throws LookupException;

	/**
	 * findAll
	 * Method to find all the domain objects
	 * @param domainObject
	 * @return
	 * @throws LookupException
	 * Collection<T>
	 */
	public Collection<T> findAll() throws LookupException;

}